package com.example.project.controller;

import com.example.project.entity.Material;
import com.example.project.entity.ResponseInfo;
import com.example.project.service.MaterialService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
//材料类别
@RestController
@RequestMapping("/material")
public class MaterialController {
    @Resource
    MaterialService materialService;

    @RequestMapping("/materialtable")
    public ResponseInfo materialtable(Material material){
        ResponseInfo res=materialService.materialtable(material);
        return res;
    }
    @RequestMapping("/addtable")
    public ResponseInfo addtable(Material material){
        ResponseInfo res=materialService.addtable(material);
        return res;
    }
    @RequestMapping("/edittable")
    public ResponseInfo edittable(Material material){
        ResponseInfo res=materialService.edittable(material);
        return res;
    }
    @RequestMapping("/deltable")
    public ResponseInfo deltable(Material material){
        ResponseInfo res=materialService.deltable(material);
        return res;
    }
}
